<div class="hp-tab-newprd">
    <?php if(!is_iframe()){?>
    <ul class="j-sw-nav">
        <li class="newprd-s1 tab-li"><a href="<?php echo base_path();?>sales/salesman_distributor_map/list">查看</a></li>
        <li class="newprd-s2 tab-li<?php if(arg(2) == 'add'){?> on <?php }?>"><a href="<?php echo base_path();?>sales/salesman_distributor_map/add">添加</a></li>
        <?php if(arg(2) == 'edit' && !empty(arg(3))){?>
            <li class="newprd-s3 tab-li on"><a href="javascript:void(0)">修改</a></li>
        <?php }?>
        <li class="newprd-s4 tab-li"><a href="<?php echo base_path();?>sales/salesman_distributor_map/assign">批量分配</a></li>
    </ul>
    <div class="table-div" >
        <?php }?>
        <div class="small-select small-input column" style="clear:both">
            <div class="form-label">销售员:</div><?php print render($form['employee_list']); ?>
        </div>
        <div class="max-select big-input column" style="clear:both">
            <?php if( empty($_GET['distributor_id'])) { ?>
                <div class="small-input address-search">
                    <div class="form-label"><span class="required">*</span>请选经销商:</div>
                    <?php print render($form['distributor_name']);
                    print render($form['select_distributor_button']);
                    ?>
                </div>
            <?php  } ?>
        </div>

        <div class="add-submit" style="text-align: center"><?php print render($form['submit']); ?></div>
    </div>
</div>
</div>

<?php print drupal_render_children($form); ?>
</div></form>
<div>
    <div class="modal fade" id="distributorModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close"
                            data-dismiss="modal" aria-hidden="true">
                        &times;
                    </button>
                    <h4 class="modal-title" id="myModalLabel">
                        选择经销商
                    </h4>
                </div>
                <div class="modal-body">
                    <?php echo @render(drupal_get_form('distributor_select_list_form','all'));?>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default"
                            data-dismiss="modal">关闭
                    </button>

                </div>
            </div><!-- /.modal-content -->
        </div><!-- /.modal -->
    </div>
</div>
<form><div>
